home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / system-config-printer / glade.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2009-10-28  |  1KB  |  36 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import gtk.glade as gtk
  5. import os
  6. import config
  7. pkgdata = config.pkgdatadir
  8.  
  9. class GtkGUI:
  10.     
  11.     def getWidgets(self, widgets):
  12.         glade_dir = os.environ.get('SYSTEM_CONFIG_PRINTER_GLADE', os.path.join(pkgdata, 'glade'))
  13.         for xmlfile, names in widgets.iteritems():
  14.             xml = gtk.glade.XML(os.path.join(glade_dir, xmlfile + '.glade'))
  15.             for name in names:
  16.                 widget = xml.get_widget(name)
  17.                 if widget is None:
  18.                     raise ValueError, "Widget '%s' not found" % name
  19.                 widget is None
  20.                 setattr(self, name, widget)
  21.             
  22.             
  23.             try:
  24.                 win = widget.get_top_level()
  25.             except AttributeError:
  26.                 win = None
  27.  
  28.             if win != None:
  29.                 gtk.Window.set_focus_on_map(widget.get_top_level(), self.focus_on_map)
  30.                 widget.show()
  31.             
  32.             xml.signal_autoconnect(self)
  33.         
  34.  
  35.  
  36.